import 'dart:convert';

import 'package:hello_flutter/domain/WorkItem.dart';
import 'package:http/http.dart' as http;

class PATClient extends http.BaseClient {
  final String pat;
  final http.Client _inner;

  PATClient(this.pat) : this._inner = http.Client();

  Future<http.StreamedResponse> send(http.BaseRequest request) {
    request.headers['Authorization'] =
        'Basic ' + base64.encode(utf8.encode(':$pat'));
    return _inner.send(request);
  }

}
